package com.google.location.im.ui;

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;

/**
 * @author tharindu
 */
public class MainMidlet extends MIDlet {
    //Application main object
    public static MainMidlet locateIm_;

    public static MainUI ui_;

    public void startApp() {
        locateIm_ = this;
        ui_ = new MainUI();
        ui_.setView(MainUI.SCR_SPLASH);
        try {
            Thread.sleep(500);
        } catch (InterruptedException ex) {

        }
        ui_.setView(MainUI.SCR_LOGIN);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public static MainMidlet getInstance() {
        return locateIm_;
    }

    public void setDisplay(Displayable d) {
        Display.getDisplay(this).setCurrent(d);
    }
}

